package table

import (
	"time"
)

// MachineStatic machine_static
// 该表为 [WebServer 规划 -- 静态模型] 的原样输出
type MachineStatic struct {
	ID int32

	DateCreate   time.Time
	IDUserCreate int32
	DateMotify   time.Time
	IDUserMotify int32

	UQ_NCCode            string // 唯一 NC 代码, 多余?
	IP                   string
	MachIntoDate         string
	Name                 string
	Description          string
	CountPath            int
	CountAxisTotal       int
	CountSpindleTotal    int
	CountTooloffsetTotal int
}

// MachineDynamic machine_dynamic
// 该表为 [WebServer 规划 -- 动态数据] 的原样输出
type MachineDynamic struct {
	ID              int32
	IDMachineStatic int32

	DateCreate time.Time

	NumPath       int
	Mode          int
	State         int
	NumTool       int
	NumTooloffset int

	CordAbsolute []byte
	CordRelative []byte
	CordMachine  []byte
	CordRemain   []byte

	SpeedProgram float32
	SpeedActual  float32

	SpindleCMDSpeed float32
	SpindleACTSpeed float32

	GCodeName string
	GCodeLine int

	PartTarget int
	PartCutted int

	TimeRun time.Time
	TimeCut time.Time

	EventESP bool
	EventALM bool
}
